<script setup name="App">
// 组件中如何拿到路由实例呢？
import { useStore } from 'vuex'
const store = useStore()
</script>
<template>
  <div>
    <p>money: {{ store.state.money }}</p>
    <p>double: {{ store.getters.double }}</p>
    <button @click="store.commit('changeMoney', 3)">update money</button>
    <button @click="store.dispatch('changeMoneyAsync', 5)">update money async</button>
  </div>
</template>
